public class NumberModel extends HCIModelAdapter
BigDecimal container.The XML APIs specify the following XSD fragment:
XSD Fragment
<xs:element name="number">
<xs:complexType>
<xs:attribute name="value" type="xs:decimal"/>
</xs:complexType>
</xs:element>
| Modifier and Type | Field and Description |
|---|---|
static String |
TAG_NAME
The XML tag name of the
NumberModel |
| Constructor and Description |
|---|
NumberModel()
Constructs a
NumberModel with a null BigDecimal. |
NumberModel(BigDecimal value)
Constructs a
NumberModel with a given BigDecimal. |
| Modifier and Type | Method and Description |
|---|---|
void |
addCharacterData(String cData)
Adds character data to the content element.
|
void |
addChild(String tagName,
XMLMarshallable child)
Adds a child to the object, the
child representing
the marshallable object which must be added to the element. |
String |
getTagName()
Gets the XML tag name of the HCI model.
|
BigDecimal |
getValue()
Gets the number contained by the
NumberModel. |
void |
marshalAttributes(XMLOutputter output)
Gives an XML representation of the attributes of an object.
|
void |
marshalChildren(XMLOutputter output)
Gives an XML representation of the child objects of an object.
|
void |
setAttributes(XMLAttributes atts)
Sets the attributes of the XML representation of the element being
processed.
|
void |
setValue(BigDecimal value)
Sets the number contained by the
NumberModel. |
marshalpublic static final String TAG_NAME
NumberModelpublic NumberModel()
NumberModel with a null BigDecimal.public NumberModel(BigDecimal value)
NumberModel with a given BigDecimal.value - the number of the NumberModel.public BigDecimal getValue()
NumberModel.NumberModelpublic void setValue(BigDecimal value)
NumberModel.value - The number contained by the NumberModelpublic void addCharacterData(String cData)
XMLMarshallablecData - The character data to be addedpublic void addChild(String tagName, XMLMarshallable child)
XMLMarshallablechild representing
the marshallable object which must be added to the element.tagName - The name of tag for the childchild - The child to be addedpublic void setAttributes(XMLAttributes atts)
XMLMarshallableatts - The XML attributes of the current elementpublic void marshalAttributes(XMLOutputter output)
IXMLMarshallableoutput - The XML output to marshal the object attributes intopublic void marshalChildren(XMLOutputter output)
IXMLMarshallableoutput - The XML output to marshal the child objects intopublic String getTagName()
ITagNameProvider